package com.aca.market.service;

import com.aca.market.entity.Item;
import com.aca.market.entity.Storage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 仓储表 服务类
 * </p>
 *
 * @author aca
 * @since 2020-11-13
 */
public interface IStorageService extends IService<Storage> {

    IPage<Storage> selectPage(Page<Storage> page, Wrapper<Storage> queryWrapper);

    //itemId:Storage的map
    Map<Long,Storage> getIdStorageMap(List<Item> items);

    //检查有无低于库存警戒线的商品
    List<Storage> checkStorage();
}
